﻿@model UcAsp.Net.Model.SetFiled
@{
    ViewBag.Title = "EditSetFiled";
    Layout = null;
}
<script>
    $(document).ready(function () {
        $("#savecate").click(function () {
            $.post("/Admin/SaveSetFiled", { FiledID: $("input[name='ID']").val(), CategoreiesID: $("input[name='CID']").val(), CnName: $("input[name='CnName']").val(), FiledName: $("select[name='FiledName']").val(), Description: $("textarea[name='Description']").val(), DataType: $("input[name='DataType']").val(), InputType: $("select[name='InputType']").val(), DefaultValue: $("input[name='DefaultValue']").val(), Sort: $("input[name='Sort']").val(), StoreText: $("select[name='StoreText']").val() }, function (dataResult) {
                if (dataResult.Result) {
                    location.reload()
                }
                else {
                    alert("确认是否输入正确。");
                }
            });
        })
    })
</script>
<div>
    <input name="ID" type="hidden" value="@Model.FiledID" />
    <input name="CID" type="hidden" value="@ViewData["CID"]" />
     <input name="Rank" type="hidden" value="@Model.Rank" />
    <p>
        <label>
            字段名称</label>
        @Html.DropDownListFor(m => m.FiledName, (SelectList)ViewData["selectlist"])
    </p>
    <p>
        <label>
            显示名称</label>
        <input class="text-input large-input" type="text" id="CnName" name="CnName" value="@Model.CnName" />
    </p>
    <p>
        <label>
            描述</label>
        <textarea id="Description" name="Description" cols="20" rows="2">@Model.Description</textarea>
    </p>
    <p>
        <label>
            数据类型</label>
        <input class="text-input large-input" type="text" id="DataType" name="DataType" value="@Model.DataType" />
    </p>
    <p>
        <label>
            输入框</label>
        <select name="InputType">
            <option value="text" @if (Model.InputType == "text")
                                 {<text>selected</text>}>text</option>
            <option value="textarea" @if (Model.InputType == "textarea")
                                     {<text>selected</text>}>textarea</option>
            <option value="select" @if (Model.InputType == "select")
                                   {<text>selected</text>}>select</option>
            <option value="image" @if (Model.InputType == "image")
                                  {<text>selected</text>}>image</option>
           <option value="hidden" @if (Model.InputType == "hidden")
                                 {<text>selected</text>}>hidden</option>
        </select>
    </p>
    <p>
        <label>
            默认值</label>
        <input class="text-input large-input" type="text" id="DefaultValue" name="DefaultValue" value="@Model.DefaultValue" />
    </p>
    <p>
        <label>
            下拉列表</label>
        <select name="StoreText">
            <option value=""></option>
            <option value="UcAsp.Net.BLL.CategoriesSelect,CategoriesSelect">栏目分类</option>
             <option value="UcAsp.Net.BLL.SysParemSelect,SysParemSelect">参数选择</option>
             <option value="UcAsp.Net.BLL.MessageThemes,MessageThemes">内容模板</option>
             <option value="UcAsp.Net.BLL.DefinedCodeSelect,DefinedCodeSelect">字典选择</option>
        </select>
    </p>
    <p>
        <label>
            传入参数</label>
        <input class="text-input large-input" type="text" id="Sort" name="Sort" value="@Model.Sort" />
    </p>
    <p>
        <input class="btn btn-primary" id="savecate" type="button" value=" 保存 " />
    </p>
</div>
